import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:drm/http/date_result.dart';
import 'package:drm/http/http_url.dart';
import 'package:drm/http/action.dart';

import 'package:drm/gdfk/azd/azd_bloc.dart';
import 'package:drm/gdfk/azd/azd_mx_entity.dart';

abstract class Event{}


abstract class BaseEvent extends Event  {
  Map<String,String> params ;
  String postUrl ;
  Event() {
    params = iniMap();
    postUrl = setPostUrl();
  }
  Map<String,String> iniMap();
  String setPostUrl();
}

abstract class ListHandTotalEvent<T> extends BaseEvent {
  ListHandTotalEvent() :super();
  Future<DateResult<Map>> getListHandTotalData() async {
    return await ActionDo.getListDateHandTotal<T>(params, postUrl: postUrl);
  }
}

abstract class ListEvent<T> extends BaseEvent {

  Future<DateResult<List<T>>> getList() async {
    return await ActionDo.getDate<T>(params, postUrl: postUrl);
  }
}

abstract class InfoEvent<T> extends BaseEvent {
  Future<DateResult<T>> getInfoDate() async {
    return await ActionDo.getInfoDate<T>(params, postUrl: postUrl);
  }
}

abstract class OtherEvent<T> extends BaseEvent {

}


class LoadingEvent extends Event {

}


class HideLoadingEvent extends Event {

}
